#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <signal.h>

void handler(int signum) {
    printf("get signal no. %d\r\n", signum);
    exit(0);
}


int main(void)
{
    signal(SIGINT, handler);
    signal(SIGTERM, handler);

    while (1);

    return 0;
}
